home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / h / dbase.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  1.4 KB  |  74 lines

  1. /* dbase.h: Definitions for the dbm database */
  2.  
  3. /*
  4.  * @(#) $Header: /xtel/pp/pp-beta/h/RCS/dbase.h,v 6.0 1991/12/18 20:42:44 jpo Rel $
  5.  *
  6.  * $Log: dbase.h,v $
  7.  * Revision 6.0  1991/12/18  20:42:44  jpo
  8.  * Release 6.0
  9.  *
  10.  *
  11.  */
  12.  
  13.  
  14.  
  15. #ifndef _H_DBASE
  16. #define _H_DBASE
  17.  
  18. #include "config.h"
  19.  
  20. /* most pcc based compilers screw up the return of structures.
  21.  * They actually return a pointer to a static struct, which is copied.
  22.  * Here is a HACK to get such a pcc version of the library to work with the
  23.  * gnu structure returning convention. NB: need a cpp which allows recursive
  24.  * definitions (such as gcc)
  25.  */
  26.  
  27. #ifdef GDBM
  28. #include "gdbm.h"
  29.  
  30. #else
  31. #ifdef NDBM
  32.  
  33. #ifndef GCC_DBM_OK
  34. #ifdef          __GNUC__
  35. #define        dbm_fetch    *dbm_fetch
  36. #define        dbm_firstkey    *dbm_firstkey
  37. #define        dbm_nextkey    *dbm_nextkey
  38. #endif          /* __GNUC__ */
  39. #endif          /* !GCC_DBM_OK */
  40.  
  41. #include    "ndbm.h"
  42.  
  43. #else
  44.  
  45. #ifndef GCC_DBM_OK
  46. #ifdef __GNUC__
  47. #define          fetch          *fetch
  48. #define          makdatum          *makdatum
  49. #define          firstkey          *firstkey
  50. #define          nextkey          *nextkey
  51. #define          firsthash          *firsthash
  52. #endif          /* __GNUC__ */
  53. #endif          /* !GCC_DBM_OK */
  54.  
  55. #include    <dbm.h>
  56. #endif
  57. #endif
  58.  
  59. #define        MAXDBENTRIES    32
  60. #define        FS        '\034'    /* the dbm seperator character */
  61. #define        ENTRYSIZE    1024    /* maximum database entry size */
  62.  
  63.  
  64. typedef struct    {
  65.     char    *db_table;
  66.     char    *db_value;
  67. }
  68.   Dbvalue [MAXDBENTRIES],
  69.   *Dbptr;
  70.  
  71.  
  72.  
  73. #endif
  74.